# encoding=utf8

import os


class eachfiles(object):

    """docstring for eachfiles"""

    def __init__(self, baseDir):
        self.baseDir = baseDir

    def loadAllFiles(self):
        eachfiles.loadFiles(self, self.baseDir)

    def loadFiles(self, baseDir):
        for files in os.listdir(baseDir):
            path = os.path.join(baseDir, files)
            if os.path.isfile(path):
                print(os.path.abspath(path))
            elif os.path.isdir(path):
                eachfiles.loadFiles(self, path)

if __name__ == '__main__':
    basedir = r'../../KNN'
    ef = eachfiles(basedir)
    ef.loadAllFiles()
